from rest_framework import serializers
from job import models
class DictSer(serializers.ModelSerializer):
    class Meta:
        model = models.Dict
        fields = '__all__'
class PositionSer(serializers.ModelSerializer):
    cname=serializers.SerializerMethodField()
    def get_cname(self,obj):
        return obj.type.name
    class Meta:
        model = models.Position
        fields = '__all__'
